// @ts-nocheck
import React from 'react';
import { ApplyPluginsType } from 'D:/实训二/G/practice-2_five/项目代码/market/node_modules/@umijs/runtime';
import * as umiExports from './umiExports';
import { plugin } from './plugin';

export function getRoutes() {
  const routes = [
  {
    "path": "/address/:id",
    "exact": true,
    "component": require('@/pages/address/[id].tsx').default
  },
  {
    "path": "/brandDetail/:id",
    "exact": true,
    "component": require('@/pages/brandDetail/[id].tsx').default
  },
  {
    "path": "/detail/:id",
    "exact": true,
    "component": require('@/pages/detail/[id].tsx').default
  },
  {
    "path": "/detailx/:id",
    "exact": true,
    "component": require('@/pages/detailx/[id].tsx').default
  },
  {
    "path": "/goods/:id",
    "exact": true,
    "component": require('@/pages/goods/[id].tsx').default
  },
  {
    "path": "/",
    "exact": true,
    "component": require('@/pages/index.tsx').default
  },
  {
    "path": "/login",
    "exact": true,
    "component": require('@/pages/login.tsx').default
  },
  {
    "path": "/topicDetail/:id",
    "exact": true,
    "component": require('@/pages/topicDetail/[id].tsx').default
  },
  {
    "path": "/main",
    "routes": [
      {
        "path": "/main/cart",
        "exact": true,
        "component": require('@/pages/main/cart.tsx').default,
        "wrappers": [require('@/wrappers/auth').default]
      },
      {
        "path": "/main/classify",
        "exact": true,
        "component": require('@/pages/main/classify.tsx').default
      },
      {
        "path": "/main/home",
        "exact": true,
        "component": require('@/pages/main/home.tsx').default
      },
      {
        "path": "/main/my",
        "exact": true,
        "component": require('@/pages/main/my.tsx').default,
        "wrappers": [require('@/wrappers/auth').default]
      },
      {
        "path": "/main/topic",
        "exact": true,
        "component": require('@/pages/main/topic.tsx').default
      }
    ],
    "component": require('@/pages/main/_layout.tsx').default
  }
];

  // allow user to extend routes
  plugin.applyPlugins({
    key: 'patchRoutes',
    type: ApplyPluginsType.event,
    args: { routes },
  });

  return routes;
}
